<?php
define('XS_EXECUTING_OS', ((strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') ? 'WIN' : 'NIX'));
define('XS_SYSTEM_SEPARATOR', (XS_EXECUTING_OS == 'WIN') ? '\\' : '/');
$pathTokens = explode(XS_SYSTEM_SEPARATOR, dirname(__FILE__));
define('XS_PLUGINDIR_NAME', $pathTokens[count($pathTokens)-3]);
$WPURL_WITH_SLASH = rtrim(get_bloginfo('wpurl'),'/').'/';
$WP_UPLOAD_PATH = get_option('upload_path');
require_once realpath(dirname(__file__) . 
	XS_SYSTEM_SEPARATOR . '..' .
	XS_SYSTEM_SEPARATOR . '..' .
	XS_SYSTEM_SEPARATOR . '..' .
	XS_SYSTEM_SEPARATOR . '..' .
	XS_SYSTEM_SEPARATOR . '..' . '/wp-config.php'
);
if (strlen(WPLANG)<1) {$XS_LANG='en';} else {$XS_LANG = strtolower(substr(WPLANG,0,2));}
// define('XS_BASE', rtrim(dirname(plugin_basename(__FILE__)),XS_SYSTEM_SEPARATOR).XS_SYSTEM_SEPARATOR);
define('XS_FULLPATH', ABSPATH . 'wp-content'.XS_SYSTEM_SEPARATOR.'plugins'.XS_SYSTEM_SEPARATOR.XS_PLUGINDIR_NAME);
define('XS_URL', $WPURL_WITH_SLASH . 'wp-content/plugins/'. XS_PLUGINDIR_NAME .'/');
define('XS_UPLOADPATH', $WP_UPLOAD_PATH);
define('XS_WPURL', $WPURL_WITH_SLASH);
define('XS_LANG', $XS_LANG);
// define('XS_BASE_URL', get_option("home"));
?>